#pragma once   

#include<stdio.h>
#define SIZE 1024

#define NONE_FLUSH (1<<1)
#define LINE_FLUSH (1<<2)
#define FULL_FLUSH (1<<3)


typedef struct my_FILE
{
    char buffer[SIZE];
    int pos;
    int cap;
    int flush_mode;
    int fileno;
}myFILE;

void my_flush(myFILE* fp);
myFILE* my_fopen(const char* pathname,const char* mode);
int my_fwrite(myFILE* fp,const char* s,int size);
void my_fclose(myFILE* fp);

